(function(){
	Ext.define('App.view.extend.date.DateTimeField', {
		extend : 'Ext.form.field.Date',
		alias : 'widget.datetimefield',
		format:'Y-m-d H:i:s',
		editable:false,
		initComponent : function() {
			this.callParent();
		},
		// overwrite
		createPicker : function() {
			var me = this, format = Ext.String.format;
			return Ext.create('App.view.extend.picker.DateTimePicker', {
				ownerCt: me.ownerCt,   
	            renderTo: document.body,   
	            floating: true,   
	            hidden: true,   
	            focusOnShow: true,   
	            minDate: me.minValue,   
	            maxDate: me.maxValue,   
	            disabledDatesRE: me.disabledDatesRE,   
	            disabledDatesText: me.disabledDatesText,   
	            disabledDays: me.disabledDays,   
	            disabledDaysText: me.disabledDaysText,   
	            format: me.format,   
	            showToday: me.showToday,   
	            startDay: me.startDay,   
	            minText: format(me.minText, me.formatDate(me.minValue)),   
	            maxText: format(me.maxText, me.formatDate(me.maxValue)),   
	            listeners: {   
	                scope: me,   
	                select: me.onSelect   
	            },   
	            keyNavConfig: {   
	                esc: function() {   
	                    me.collapse();   
	                }   
	            }  
			});
		},
		/**  
	     * @private  
	     */  
	    onExpand: function() {   
	        var value = this.getValue();   
	  
	        //多传一个参数，从而避免时分秒被忽略。   
	        this.picker.setValue(Ext.isDate(value) ? value : new Date(), true);   
	    }  
	});
})()